﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;

namespace HgRemoteContracts
{
	[ServiceContract(CallbackContract = typeof(IHgCallback))]
	public interface IHgServer
	{
		[OperationContract]
		List<StatusItem> Status(string repoName);

		[OperationContract]
		List<HgRepo> GetRepositories();

		[OperationContract]
		List<StatusItem> Commit(string repoName, HgUser user, string message, string[] files);

		[OperationContract]
		List<string> Diff(string repoName, string path);

		[OperationContract]
		List<StatusItem> Add(string repoName, string[] paths);

		[OperationContract]
		List<StatusItem> Forget(string repoName, string[] paths);

		[OperationContract]
		List<StatusItem> Revert(string repoName, bool backup, string[] paths);

		[OperationContract]
		List<StatusItem> DeleteUnversioned(string repoName, string[] paths);

		[OperationContract]
		VisualDiffInfo VisualDiff(string repoName, string path);

		[OperationContract]
		List<StatusItem> Rollback(string repoName);

		[OperationContract]
		void RunTask(string repoName, string taskName);

		[OperationContract]
		void Incoming(string repoName);

		[OperationContract]
		void Outgoing(string repoName);

		[OperationContract]
		void Fetch(string repoName, HgUser user);

		[OperationContract]
		void Push(string repoName);
	}
}
